
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -Wall -Werror -Wextra -Wsign-conversion -Wconversion")

add_executable(test_log test_log.cpp)

add_executable(test_ring_mem test_ring_mem.cpp
  ${PROJECT_SOURCE_DIR}/src/ring_mem.cpp)

add_executable(test_thread_pool test_thread_pool.cpp
  ${PROJECT_SOURCE_DIR}/src/thread_pool.cpp)
target_link_libraries(test_thread_pool pthread)

set(OUTPUT_ROOT ${PROJECT_SOURCE_DIR}/output)
install(TARGETS test_log
    DESTINATION ${OUTPUT_ROOT}/socket_ipc/bin)
install(TARGETS test_ring_mem
    DESTINATION ${OUTPUT_ROOT}/socket_ipc/bin)
install(TARGETS test_thread_pool
    DESTINATION ${OUTPUT_ROOT}/socket_ipc/bin)
